<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>互动雷达</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<style type="text/css">
		body{
			background: #e9e9e9;
		}
		/*公共头部带搜索*/
		.public_container{
			margin: 20px;
			background: #fff;
		}
		.public_title_container{
			height: 54px;
			padding: 0 20px;
			font-size: 14px;
			display: flex;
			align-items: center;
			background: #f9f9f9;
			border-bottom: 1px solid #f0f0f0;
		}
		.public_buttonSearch_container{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20px;
			background: #fff;
		}
		.public_buttonSearch_container a{
			color: #fff;
			background-color: #2f54eb;
			text-shadow: 0 -1px 0 rgba(0,0,0,.12);
			height: 24px;
			padding: 4px 15px;
			font-size: 14px;
			border-radius: 2px;
			display: flex;
			align-items: center;
			cursor: pointer;
		}
		.public_Search_container{
			position: relative;
		}
		.public_Search_container input{
			width: 240px;
			height: 32px;
			border: 1px solid #d9d9d9;
		}
		.public_Search_container i{
			position: absolute;
			bottom: 6px;
			right: 10px;
			cursor: pointer;
		}
		/*公共头部带搜索 end*/
		.public_table_container{
			padding: 0 20px 20px 20px;
		}
		.main-container-h{
			padding: 0 40px 20px 40px;
		}
		.pageing-container-h{
			display: flex;
			justify-content: space-between;
		}
		.pageing-content-h{
			line-height: 28px;
		}
		.pageing-content-h a{
			border: 1px solid #e2e2e2;
			padding: 4px 15px;
			color: #333;
			line-height: 28px;
			border-radius: 2px;
		}
	</style>
</head>
<body>
	
	<div class="public_container">
		<!-- /*公共头部带搜索*/ -->
		<div class="public_content">
			<div class="public_title_container">
				<p>互动雷达</p>
			</div>
			<div class="public_buttonSearch_container">
				<a href="newradar.html">新建雷达链接</a>
				<div class="public_Search_container">
					<input type="text" name="title" required  lay-verify="required" placeholder="输入要搜索的名称" autocomplete="off" class="layui-input">
					<i class="layui-icon layui-icon-search"></i>
				</div>
			</div>
		</div>
		<!-- /*公共头部带搜索*/ end -->
		<!-- 公共表格部分 -->
		<div class="public_table_container">
			<table class="layui-table" >
			  <colgroup>
			      <col>
			      <col>
			      <col>
			      <col>
			      <col>
			      <col>
			      <col>
			      <col width="200px">
			    </colgroup>
			    <thead>
			      <tr>
			        <th>链接标题</th>
			        <th>链接</th>
			        <th>客户标签</th>
<!-- 			        <th>创建人</th> -->
			        <th>点击人数</th>
			        <th>创建时间</th>
			        <th>类型</th>
			        <th>操作</th>
			      </tr> 
			    </thead>
			    <tbody>
			    {loop $res as $r}
			      <tr>
			        <td>{$r->link_title}</td>
			        <td>{$r->link}</td>
			        <td>{$r->ex_tag ?? '-'}</td>
			        <!-- <td>张经理</td> -->
			        <td>0</td>
			        <td>{$r->ctime}</td>
			        <td>{$r->type == 1 ? '链接' : 'pdf文件'}</td>
			        <td>
			        	<a href="radardetail-{$r->id}.html" class="layui-btn layui-btn-sm" >详情</a>
			        	<a href="newradar-{$r->id}.html" class="layui-btn layui-btn-sm" >修改</a>
			        	<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" onclick="del_radar({$r->id})">删除</button>
			        </td>
			      </tr>
			    {/loop}
			    </tbody>
			</table>
		</div>
		<div class="main-container-h pageing-container-h">
		        <div class="pageing-content-h">
		           <span>{$p->totalnum}条/{$p->totalpage}页</span> 
		        </div>
				<ul class="pageing-content-h">
		           {P weidogsadmin}
				</ul>
		    </div>
		<!-- 公共表格部分 end-->
	</div>
	
	<script src="https://cdn.bootcdn.net/ajax/libs/jquery/2.1.0/jquery.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/js/ajax.js"></script>
	<script type="/text/javascript">
		// 弹窗
		layui.use('layer', function(){
		  var layer = layui.layer;
		}); 
	</script>
	<script type="text/javascript">
		function del_radar(id){
			if(confirm('确定删除吗？')){
				myAjaxPost(false, true, 'del_radar.html', { id:id}, function (resp) {
						if (resp.status == 'success') {
							tusi(resp.msg);
							setTimeout(function(){
								location.reload();
							},500);
						}else{
							alert(resp.msg);
						}
					});
			}
		}
	</script>
</body>
</html>